package com.example.fireassistant_server.exception;

public enum ExceptionType {

    UNAUTHORIZED(401, "未登录"),
    BAD_REQUEST(400, "请求错误"),
    FORBIDDEN(403, "无权操作"),

    NOT_FOUND(404, "未找到"),
    INNER_ERROR(500, "系统内部错误"),
    USER_NAME_DUPLICATE(40001001, "用户名重复"),

    WECHAT_USER_OPENID_DUPLICATE(40001004,"用户openId重复"),
    USER_NOT_FOUND(40401002, "用户不存在"),


    WECHAT_USER_NOT_FOUND(4041003,"微信用户不存在"),

    COMPANY_NOT_FOUND(40402002,"单位不存在"),
    USER_PASSWORD_NOT_MATCH(40001003, "用户名或密码错误"),


    HYDRANT_NOT_FOUND(40402001, "消火栓不存在"),

    HYDRANT_DUPLICATE(40002002, "该点消火栓已存在"),
    FILE_NOT_FOUND(40403001, "文件不存在"),
    POLYlINE_NOT_FOUND(40404001,"该线段不存在"),
    POLYGON_NOT_FOUND(40405001,"该区域不存在"),
    CIRCLE_NOT_FOUND(40406001, "该标记圈不存在"),
    ESSENTIAL_NOT_FOUND(40407001,"要点不存在"),
    POI_NOT_FOUND(40408001,"POI点不存在"),
    USER_NOT_ENABLED(50001001, "用户未启用"),
    USER_LOCKED(50001002, "用户被锁定");


    private final Integer code;
    private final String message;

    ExceptionType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


}
